home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
pxewin.zip
/
BROWSEFM.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1992-02-27
|
4KB
|
148 lines
// PXEWIN - (C) Copyright 1992 by Beam Engineering, INC.
// BROWSEFM.HPP //
// Contents ----------------------------------------------------------------
//
// This module contains the MDI compatible BrowserFrame class.
//
// End ---------------------------------------------------------------------
// External Reference Name for this Header ---------------------------------
#ifndef BROWSEFM_HPP
#define BROWSEFM_HPP
// End ---------------------------------------------------------------------
// Interface Dependencies --------------------------------------------------
#ifndef PXSCROLL_CPP
#include "pxscroll.cpp"
#endif // PXSCROLL_CPP //
#ifndef PXI_HPP
#include "pxi.hpp"
#endif // PXI_HPP //
#ifndef DBDISPLY_CPP
#include "dbdisply.cpp"
#endif // DBDIPSLY_CPP //
#ifndef BROWSE_CPP
#include "browse.cpp"
#endif // BROWSE_CPP //
// End ---------------------------------------------------------------------
// class BrowserFrame //
_CLASSDEF(BrowserFrame)
class BrowserFrame:public TMDIFrame
{
private:
PPXI engine; /* Pointer to engine
initialization object */
int error; /* error flag */
PWNDCLASS MyClass; /* Windows class */
PBrowser NewChild; /* New child pointer */
virtual const Pchar streamableName()
const /* Defines the streamable
name for this class. */
{
return "BrowserFrame";
}
protected:
virtual Pvoid read(Ripstream); /* Read persistant object */
virtual void write(Ropstream); /* Write persistant object */
virtual void ReadChildren(Ripstream); /* Read children from desk
top file */
virtual void WriteChildren(Ropstream); /* Write children to desk
top file */
BrowserFrame(StreamableInit): /* Persistant object
constructor */
TMDIFrame(streamableInit)
{
}
public:
BrowserFrame(LPSTR ATitle);
static PTStreamable build(); /* Build persistant object */
/* Create a child window */
virtual PTWindowsObject CreateChild();
~BrowserFrame(); /* Close down all your
children */
/* Set up frame to so that
you can have child
windows */
void SetupWindow();
/* If a file open command is
recieved, open a new
browser window */
virtual void CreateBrowser(RTMessage Msg) =
[CM_FIRST + CM_FILEOPEN];
/* Opens a desktop file as
a persistant object
interface. */
virtual void OpenDeskTop(RTMessage Msg) =
[CM_FIRST + CM_OPENED];
/* Save the current desktop
as a persistant object. */
virtual void SaveDeskTop(RTMessage Msg) =
[CM_FIRST + CM_SAVEDT];
/* Count the number of child
windows. */
int GetChildCount();
void MenuItemDisable(int item); /* Disable a menu item */
void MenuItemEnable(int item); /* Enable a menu item */
/* Check your children. This
message is sent by the
browser frame that is in
the process of destroying
itself. */
virtual void CheckChildren(RTMessage Msg) =
[WM_CHKCHILD];
virtual void GetWindowClass(WNDCLASS& AWndClass);
/* Set the mouse cursor to
hour glass type */
virtual void CursorWait(RTMessage Msg) =
[WM_SETWTCUR];
/* Set the mouse cursor to
normal type */
virtual void CursorNormal(RTMessage Msg) =
[WM_SETNMCUR];
/* Show error message and
kill associated window.
Anytime you get ANY error
from the PDOX engine
except an engine
intialization, it is
dispatched here.
*/
virtual void PXError(RTMessage Msg) =
[WM_PXERROR];
};
// Description -------------------------------------------------------------
//
// This class allows construction of the MDI frame which will hold all
// the child windows.
//
// End ---------------------------------------------------------------------
// Define inserters and extractors for persistant objects:
inline Ripstream operator >> (Ripstream is,RBrowserFrame cl)
{return is >> (RTStreamable)cl;}
inline Ripstream operator >> (Ripstream is,RPBrowserFrame cl)
{return is >> (RPvoid)cl;}
inline Ropstream operator << (Ropstream os,RBrowserFrame cl)
{return os << (RTStreamable)cl;}
inline Ropstream operator << (Ropstream os,PBrowserFrame cl)
{return os << (PTStreamable)cl;}
#endif // BROWSEFM_HPP //